tutorial10/m_array.c
/* * Accord Software, Inc. * * Tutorial 10 - CIDL file. * * Simple m_arraysum function. Add X by Y by Z * numbers and return the result. */ #include "m_array.h" int arraysum(num) int num[X][Y][Z]; { int x; int y; int z; int sum = 0; for (x = 0; x < X; x++) { for (y = 0; y < Y; y++) { for (z = 0; z < Z; z++) { printf("num[%d][%d][%d] = %d\n", x, y, z, num[x][y][z]); sum += num[x][y][z]; } } } return sum; }